from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
import time
testCase = "DBshop013"
firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
firefox.find_element_by_xpath('//p/a[5]').click()
goodsClassName='商品分类测试'
# firefox.find_element_by_partial_link_text('添加分类').click()
# time.sleep(10)
# firefox.find_element_by_id('class_name').send_keys('商品分类测试')
# firefox.find_element_by_id('class_sort').clear()
# firefox.find_element_by_id('class_sort').send_keys('1')
# firefox.find_element_by_xpath('//button[contains(text(),"保存分类")]').click()
#xpath的轴定位
# firefox.find_element_by_xpath('//td[contains(.,"%s")]/following-sibling::td[4]/a[2]'%goodsClassName).click()

# firefox.find_element_by_id('class_sort').clear()
# firefox.find_element_by_id('class_sort').send_keys('4')
# firefox.find_element_by_xpath('//button[contains(text(),"保存分类")][2]').click()
# time.sleep(5)

a=firefox.find_element_by_xpath('//td[contains(.,"%s")]/following-sibling::td[2]'%goodsClassName).get_property('value')

